Loyola College B.Sc. Statistics April 2004 Numerical Methods Using ‘C’ Question Paper PDF Download

LOYOLA COLLEGE (AUTONOMOUS), CHENNAI –600 034

B.Sc., DEGREE EXAMINATION – STATISTICS

FOURTH SEMESTER – APRIL 2004

ST-4202/STA202 – NUMERICAL METHODS USING ‘C’

14.04.2004                                                                                                           Max:100 marks

9.00 – 12.00

 

SECTION -A

 

Answer ALL questions                                                                               (10 ´ 2 = 20 marks)

 

  1. What is an assignment statement? What is the relationship between an assignment statement and an expression statement?
  2. Mention the difference between pre-increment and post-increment operator.
  3. Give the syntax of ternary operator.
  4. What is the output of the following program segment?

for (i = 0, j = 0; i < = 5; i ++, j ++)

print f (” %d\ n”, i+j);

  1. Mention the difference between break and continue statement.
  2. What is an array?
  3. Comment on the following statement:

” scanf () and get char() functions are equivalent”.

  1. Find the value of f (10) using Lagrange’s linear interpolation for the following function:

x:   7    19

f:  15    35.

 

  1. Evaluate using Trapezoidal rule where f(x) is defined as

 

x: 0.8 0.9 1.0 1.1 1.2
f: 0.71736 0.78333 0.84147 0.92314 0.96356

 

  1. Give the steps to find the root of an equation by Newton-Raphson method.

 

SECTION – B

 

Answer any FIVE questions                                                                          (5 ´ 8 = 40 marks)

 

  1. a) Explain the data types available in C.
  2. b) What are type qualifiers? (6+2)

 

  1. Explain the concept of branching and looping with examples.

 

  1. Explain the syntax of the following:
  2. a) printf() b) toupper() c) pow()           d) floor()

 

 

 

 

 

  1. Give the output of the following program segments:
  2. a) i = x = 0; b) x = 0;

do                                                   for (i = 0; i<5; i++)

{                                                                 {

if (i% 5 = =0)                                  for (j = 0; j<i;j++)

{                                                                 {

x++;                                                switch (i+j-1)

printf(“%d \n”, x);                         {

}                                                     case -1:

i++;                                                case 0: x = x+1;

}while (i<20);                                             break;

printf (“%d’1′ x);                             case 1:

case 2:

case 3:  x = x+2;

break;

default:  x = x+3;

break;

}

printf (“%d\n”, x);

}

}                                                                         (3+5)

 

  1. a) Write a program to accept an integer and display it in reverse order.

 

  1. b) Write a program using function to find the factorial of a given positive integer. (4+4)

 

  1. Find the determinant of the following matrix by pivotal condensation method.

 

 

 

  1. Write a program to solve the equation x2+3x-5=0 using bisection method.

 

  1. Write a program to find the largest eigen vector by the method of iteration.

 

SECTION – C

 

Answer any TWO questions                                                                       (2 ´ 20 = 40 marks)

 

  1. a) Explain the structure of a C program.
  2. b) Write a program to find the maximum among ‘n’ given integers.
  3. c) Explain the concept of arrays with an example. (6+6+8)

 

  1. a) Write a program to find the roots of a quadratic equation of the form ax2+bx+c=0.
  2. b) Write a program to find the sum of 2 square matrices of order mxm.
  3. c) What are user defined functions? Explain the method of declining and defining a user

defined function.                                                                                                  (6+6+8)

 

 

 

  1. a) Explain the Gauss-elimination method to solve a given set of simultaneous equation

and write a program for the same.

 

  1. b) Evaluate using simpson’s 1/3 rule by taking h as 0.1. (12+8)

 

  1. a) Write a program using Lagrange’s interpolation method to evaluate f(y) where ‘f’ is a function defined as

x    :  x1    x2   ……..xn

f(x):  f1  f2  ……..fn

Assume that x1, x2…..xn,   f1,  f2,……fn are known values.

 

  1. b) Find the inverse of the following matrix by Gauss-Jordon elimination method.

 

A =                                                                                         (12+8)

 

Go To Main page

 

 

 

 

 

Latest Govt Job & Exam Updates:

View Full List ...

© Copyright Entrance India - Engineering and Medical Entrance Exams in India | Website Maintained by Firewall Firm - IT Monteur